﻿Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Xml
Imports System.Reflection


Partial Class 仪器


    Public 类型 As String
    Public 编号 As String
    Public 检查2C As String
    Public 加常数 As String
    Public 读数精度 As String
    Public 读数类型 As String
    Public 加密数据 As String


    Public Property 项目 As 项目

    Public Shared Function Paras(xxNode As XmlNode) As 仪器

        Dim tmpClass As 仪器 = New 仪器()
        Dim nameList As XmlAttributeCollection = xxNode.Attributes
        For Each xxattribute As XmlAttribute In nameList

            Try

                Dim tmpType As Type = tmpClass.GetType()
                Dim tmpP As FieldInfo = tmpType.GetField(xxattribute.Name)
                tmpP.SetValue(tmpClass, xxattribute.Value)
            Catch ex As Exception

            End Try

        Next


        'XmlNodeList childList = xxNode.ChildNodes '取得row下的子节点集合
        'foreach (XmlNode xxxNode in childList)
        '
        '    if (xxxNode.Name.Equals("测站"))
        '    
        '        测站 tmpClass1 = new 测站()
        '        tmpClass.测站.Add(tmpClass1.Paras(xxxNode))
        '     

        ' 


        Return tmpClass
    End Function

End Class
